Xbasic

Office::ExcelDocumentLoad Method

Syntax

.Load as L (FileName as C)

Arguments

FileNameCharacter

The Excel file to load. File must end in .xlsx extension.

Returns

resultLogical

Returns .T. if operation succeeds, otherwise .F.. The Office::ExcelDocument CallResult object will contain additional information if the operation fails.

Description

Load the contents of an existing Excel 2007 (.xlsx) file.

Example

DIM obj as Office::ExcelDocument
? obj.load("C:\Users\janice\Documents\Excel\inventory.xlsx")
= .T.
The Office::ExcelDocument class is for working with Excel 2007 (.xlsx) files. For Excel 2003 (.xls) files, use Office::Excel2003Document.

See Also